/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package telas;

import beans.Funcionario;
import facade.FacadeAlmox;
import javax.swing.JFrame;
import telas.atualizar.VW_AtualizaFuncionario;
import telas.atualizar.VW_AtualizaPessoaFisica;
import telas.atualizar.VW_AtualizaPessoaJuridica;
import telas.atualizar.VW_AtualizaProduto;
import telas.cadastra.VW_CadastraFuncionario;
import telas.cadastra.VW_CadastraPedido;
import telas.cadastra.VW_CadastrarPessoaFisica;
import telas.cadastra.VW_CadastrarPessoaJuridica;
import telas.exclusao.VW_ExcluirFuncionario;
import telas.exclusao.VW_ExcluirPessoaFisica;
import telas.exclusao.VW_ExcluirPessoaJuridica;
import telas.exclusao.VW_ExcluirProduto;
import telas.seleciona.VW_Selecionar_Funcionario_PorID;
import telas.seleciona.VW_Selecionar_PessoaFisica;
import telas.seleciona.VW_Selecionar_PessoaJuridica;
import telas.seleciona.VW_Selecionar_Produto;

/**
 *
 * @author Ronaldo
 */
public class Principal extends javax.swing.JFrame {

    /**
     * Creates new form Principal
     */
    public Principal() {
        initComponents();
    }
    Funcionario funcionarioAtual = new Funcionario();
      public Principal(Funcionario trab) {
//          trab = new Funcionario();
          this.funcionarioAtual = FacadeAlmox.getInstancia().consultarFuncionarioLogin(trab.getLogin());
          initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jRadioButton1 = new javax.swing.JRadioButton();
        jPanel1 = new javax.swing.JPanel();
        F_IN = new javax.swing.JRadioButton();
        F_SL = new javax.swing.JRadioButton();
        F_RE = new javax.swing.JRadioButton();
        F_AT = new javax.swing.JRadioButton();
        Bt_Funcionario = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        bt_Transacoes = new javax.swing.JButton();
        RealizarPedido = new javax.swing.JRadioButton();
        ConsultarPedido = new javax.swing.JRadioButton();
        RemoveProduto = new javax.swing.JRadioButton();
        jPanel6 = new javax.swing.JPanel();
        PF_IN1 = new javax.swing.JRadioButton();
        PF_SL1 = new javax.swing.JRadioButton();
        PF_RE1 = new javax.swing.JRadioButton();
        PF_AT1 = new javax.swing.JRadioButton();
        bt_PF = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        PJ_IN2 = new javax.swing.JRadioButton();
        PJ_SL2 = new javax.swing.JRadioButton();
        PJ_RE2 = new javax.swing.JRadioButton();
        PJ_AT2 = new javax.swing.JRadioButton();
        bt_PJ = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        ProdIn = new javax.swing.JRadioButton();
        ProdSel = new javax.swing.JRadioButton();
        ProdRes = new javax.swing.JRadioButton();
        ProdAt = new javax.swing.JRadioButton();
        bt_Produto = new javax.swing.JButton();

        jRadioButton1.setText("jRadioButton1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Funcionário\n"));

        F_IN.setText("Inserir");
        F_IN.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                F_INActionPerformed(evt);
            }
        });

        F_SL.setText("Selecionar");
        F_SL.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                F_SLActionPerformed(evt);
            }
        });

        F_RE.setText("Remover");

        F_AT.setText("Atualizar");

        Bt_Funcionario.setText("Executar");
        Bt_Funcionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Bt_FuncionarioActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(F_SL)
                    .addComponent(F_AT)
                    .addComponent(F_RE)
                    .addComponent(F_IN))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(Bt_Funcionario)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(F_IN)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(F_SL)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(F_RE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(F_AT)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(Bt_Funcionario))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Transações\n"));

        jLabel1.setText("Selecionar Produto");

        bt_Transacoes.setText("Executar");
        bt_Transacoes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_TransacoesActionPerformed(evt);
            }
        });

        RealizarPedido.setText("Realizar Pedido");

        ConsultarPedido.setText("Consultar Pedido");

        RemoveProduto.setText("Remove Produto");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(RemoveProduto)
                            .addComponent(ConsultarPedido)
                            .addComponent(RealizarPedido))
                        .addGap(0, 0, Short.MAX_VALUE))))
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(bt_Transacoes)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(RealizarPedido)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(ConsultarPedido)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(RemoveProduto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(bt_Transacoes)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Pessoa Física\n"));

        PF_IN1.setText("Inserir");
        PF_IN1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                PF_IN1ActionPerformed(evt);
            }
        });

        PF_SL1.setText("Selecionar");

        PF_RE1.setText("Remover");

        PF_AT1.setText("Atualizar");

        bt_PF.setText("Executar");
        bt_PF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_PFActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(PF_SL1)
                    .addComponent(PF_AT1)
                    .addComponent(PF_RE1)
                    .addComponent(PF_IN1)
                    .addComponent(bt_PF))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(PF_IN1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(PF_SL1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(PF_RE1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PF_AT1)
                .addGap(13, 13, 13)
                .addComponent(bt_PF))
        );

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Pessoa Jurídica\n"));

        PJ_IN2.setText("Inserir");
        PJ_IN2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                PJ_IN2ActionPerformed(evt);
            }
        });

        PJ_SL2.setText("Selecionar");

        PJ_RE2.setText("Remover");

        PJ_AT2.setText("Atualizar");

        bt_PJ.setText("Executar");
        bt_PJ.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_PJActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(PJ_SL2)
                    .addComponent(PJ_IN2)
                    .addComponent(bt_PJ)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(PJ_AT2))
                    .addComponent(PJ_RE2))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(PJ_IN2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PJ_SL2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PJ_RE2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(PJ_AT2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(bt_PJ))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Produto\n\n"));

        ProdIn.setText("Inserir");
        ProdIn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ProdInActionPerformed(evt);
            }
        });

        ProdSel.setText("Selecionar");

        ProdRes.setText("Remover");

        ProdAt.setText("Atualizar");

        bt_Produto.setText("Executar");
        bt_Produto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_ProdutoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(ProdSel)
                    .addComponent(ProdAt)
                    .addComponent(ProdRes)
                    .addComponent(ProdIn)
                    .addComponent(bt_Produto))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(ProdIn)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(ProdSel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(ProdRes)
                .addGap(3, 3, 3)
                .addComponent(ProdAt)
                .addGap(13, 13, 13)
                .addComponent(bt_Produto))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(32, 32, 32)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(53, 53, 53))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void F_INActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_F_INActionPerformed
VW_CadastraFuncionario c = new VW_CadastraFuncionario();
        c.setVisible(true);
        c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }//GEN-LAST:event_F_INActionPerformed

    private void PF_IN1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_PF_IN1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_PF_IN1ActionPerformed

    private void PJ_IN2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_PJ_IN2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_PJ_IN2ActionPerformed

    private void ProdInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ProdInActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ProdInActionPerformed

    private void F_SLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_F_SLActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_F_SLActionPerformed

    private void Bt_FuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Bt_FuncionarioActionPerformed
        if(F_IN.isSelected()){
            VW_CadastraFuncionario c = new VW_CadastraFuncionario();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//            F_IN.setSelected(false);
        }else if(F_AT.isSelected()){
            VW_AtualizaFuncionario c = new VW_AtualizaFuncionario();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(F_RE.isSelected()){
            VW_ExcluirFuncionario c = new VW_ExcluirFuncionario();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(F_SL.isSelected()){
            VW_Selecionar_Funcionario_PorID c = new VW_Selecionar_Funcionario_PorID();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

        }
    }//GEN-LAST:event_Bt_FuncionarioActionPerformed

    private void bt_PFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_PFActionPerformed
        if(PF_IN1.isSelected()){
            VW_CadastrarPessoaFisica c = new VW_CadastrarPessoaFisica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(PF_AT1.isSelected()){
            VW_AtualizaPessoaFisica c = new VW_AtualizaPessoaFisica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(PF_RE1.isSelected()){
            VW_ExcluirPessoaFisica c = new VW_ExcluirPessoaFisica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(PF_SL1.isSelected()){
            VW_Selecionar_PessoaFisica c = new VW_Selecionar_PessoaFisica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }
    }//GEN-LAST:event_bt_PFActionPerformed

    private void bt_PJActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_PJActionPerformed
        if(PJ_IN2.isSelected()){
            VW_CadastrarPessoaJuridica c = new VW_CadastrarPessoaJuridica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(PJ_AT2.isSelected()){
            VW_AtualizaPessoaJuridica c = new VW_AtualizaPessoaJuridica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(PJ_RE2.isSelected()){
            VW_ExcluirPessoaJuridica c = new VW_ExcluirPessoaJuridica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(PJ_SL2.isSelected()){
            VW_Selecionar_PessoaJuridica c = new VW_Selecionar_PessoaJuridica();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }
    }//GEN-LAST:event_bt_PJActionPerformed

    private void bt_ProdutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_ProdutoActionPerformed
//        if(ProdIn.isSelected()){
//            VW_CadastrarProduto c = new VW_CadastrarPessoaFisica();
//            c.setVisible(true);
//            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//        }else 
            if(ProdAt.isSelected()){
                VW_AtualizaProduto c = new VW_AtualizaProduto();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(ProdRes.isSelected()){
            VW_ExcluirProduto c = new VW_ExcluirProduto();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(ProdSel.isSelected()){
            VW_Selecionar_Produto c = new VW_Selecionar_Produto();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }
    }//GEN-LAST:event_bt_ProdutoActionPerformed

    private void bt_TransacoesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_TransacoesActionPerformed
//funcionarioAtual;        
          if(RealizarPedido.isSelected()){
              VW_CadastraPedido c = new VW_CadastraPedido();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else 
            if(ConsultarPedido.isSelected()){
                VW_AtualizaProduto c = new VW_AtualizaProduto();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }else if(RemoveProduto.isSelected()){
            VW_ExcluirProduto c = new VW_ExcluirProduto();
            c.setVisible(true);
            c.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }


    }//GEN-LAST:event_bt_TransacoesActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Bt_Funcionario;
    private javax.swing.JRadioButton ConsultarPedido;
    private javax.swing.JRadioButton F_AT;
    private javax.swing.JRadioButton F_IN;
    private javax.swing.JRadioButton F_RE;
    private javax.swing.JRadioButton F_SL;
    private javax.swing.JRadioButton PF_AT1;
    private javax.swing.JRadioButton PF_IN1;
    private javax.swing.JRadioButton PF_RE1;
    private javax.swing.JRadioButton PF_SL1;
    private javax.swing.JRadioButton PJ_AT2;
    private javax.swing.JRadioButton PJ_IN2;
    private javax.swing.JRadioButton PJ_RE2;
    private javax.swing.JRadioButton PJ_SL2;
    private javax.swing.JRadioButton ProdAt;
    private javax.swing.JRadioButton ProdIn;
    private javax.swing.JRadioButton ProdRes;
    private javax.swing.JRadioButton ProdSel;
    private javax.swing.JRadioButton RealizarPedido;
    private javax.swing.JRadioButton RemoveProduto;
    private javax.swing.JButton bt_PF;
    private javax.swing.JButton bt_PJ;
    private javax.swing.JButton bt_Produto;
    private javax.swing.JButton bt_Transacoes;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JRadioButton jRadioButton1;
    // End of variables declaration//GEN-END:variables
}
